package model

import "gorm.io/gorm"

type OnlineModel struct {
	gorm.Model
	ModelInfoID uint   `gorm:"column:model_info_id;type:bigint;not null;uniqueIndex" json:"model_info_id"`
	ModelName   string `gorm:"column:model_name;type:varchar(255)" json:"model_name"`
	Uri         string `gorm:"column:uri;type:text;not null" json:"uri"`
	ApiKey      string `gorm:"column:api_key;type:text;not null" json:"api_key"`

	ModelInfo ModelInfo `gorm:"foreignKey:ModelInfoID" json:"model_info"`
}

func (OnlineModel) TableName() string {
	return "online_model"
}
